This invention relates generally to an image reading apparatus, and particularly to a correction of shading in a main-scan direction in the image reading apparatus in which a document is loaded face up.
In a conventional image reading apparatus in which the document is loaded face up, it has been known that, concerning the correction of image data in a main-scan direction, a corrective coefficient is factory-set up based on an irradiated-light data in a central part of the apparatus, and a main-scan shading correction is carried out based on the set corrective coefficient for correcting the image data in the main-scan direction.
Now, the explanation is given to a procedure for correcting the shading in a main-scanning direction (direction that pixels in a line sensor are aligned) and a sub-scanning direction (perpendicular direction to the main scanning direction) (hereinafter referred to as a main-scan shading correction and a sub-scan shading correction) in the conventional image reading apparatus with reference to a flowchart shown in FIG. 8. First of all, in a factory-shipment condition in which a document table is lit up only by an irradiator attached to the apparatus itself, a reference document having a uniform density is loaded face up (#1), and read out from above by a charge-coupled device (hereinafter referred to as CCD) line sensor (#2). Thereby, data concerning the irradiated light for a main-scan directional line at a sub-scan directional central part (D.sub.S for one line) is obtained(#3). After that, a ratio of the irradiated-light output value D.sub.S of each pixel in the data obtained in the step #3 to a preset reference value Z.sub.0) of each pixel in the CCD is determined by the following equation [1] (#5). The value .beta. determined in the step #5 is stored as a main-scan shading corrective coefficient which is used in a later-described process (#6).
.beta.=Z.sub.0 /D.sub.S [1]
.beta.: main-scan shading corrective coefficient of each pixel in CCD PA1 D.sub.S : irradiated-light output value of each pixel when the CCD reads out a main-scan directional line in a central part of the apparatus under only the irradiated light at the factory PA1 Z.sub.0 : output reference value of each pixel after the correction (constant) PA1 D.sub.IN : output value of each pixel when the CCD reads out a main-scan directional line under the service condition PA1 D.sub.S : irradiated-light output value of each pixel PA1 G: external-light amount PA1 D.sub.OUT : output value of each pixel after the main-scan shading correction PA1 Z.sub.0 : output reference value of each pixel after the correction (constant)
Next, under the service conditions for a user in which the external light enters as well as the light from the irradiator attached to the apparatus, a document is loaded face up on the document table (#7). The CCD scans and reads out from above the document surface and a reference platform which is arranged in the sub-scan direction for correcting nonuniformity in illuminance (#8), following which, the D.sub.F (data on the irradiated light and external light on the reference platform) is obtained (#9). After that, the ratio .gamma. of the above-obtained D.sub.F (data on the irradiated light and external light for each of sub-scan directional lines on the reference platform) to the Z.sub.0 (preset output reference value of each pixel in CCD) is calculated according to the following equation [2] (#10), and the calculated ratio .gamma. is stored as a sub-scan shading corrective coefficient (#11). EQU .gamma.=Z.sub.0 /D.sub.F [2]
Further, the output value which is read out from each pixel in the CCD for scanning the document surface in the step #8, is assumed D.sub.IN (#12). Following the steps #11 and #12, the shading corrective processing is carried out for the output value D.sub.IN, and the D.sub.OUT (output value of each pixel after correction) is determined by the following equation (#13): EQU D.sub.OUT =.beta..times..gamma..times.D.sub.IN [3]
However, the above-mentioned conventional image reading apparatus applies the main-scan shading corrective coefficient which is calculated based on the output value of each pixel read out in the central part of the apparatus under the light from the irradiator only, in order to carry out the main-scan shading correction for the output value of each pixel which is read out in a condition that both of the irradiated light and external light are entering. Therefore, there results a problem that the output value of each pixel after the correction brings on an over-correction.
Referring to FIGS. 9 and 10, the following explains the detail of the above-mentioned problem. In FIG. 9, the reference numeral A1 designates the output value of each pixel in the CCD when the CCD reads out a main-scan directional line in a central part of the apparatus under the light only from the irradiator at the factory. Due to the nonuniformity in the illuminance of the irradiated light in the main-scan direction, the values A1 are curved as shown in the figure. Also, in FIG. 9, the reference numeral A2 designates the output value of each pixel in CCD after correcting the main-scan shading which is obtained by multiplying the value A1 by the main-scan shading corrective coefficient .beta.. When the document surface to be read out has a uniform reflectance, it is desired that the output value from the CCD take on the uniform numerical value. Multiplied by the main-scan shading corrective coefficient .beta., the output value A1 becomes the output value A2 (the output reference value Z.sub.0) which is the value in the uniform illuminance seemingly.
However, under the service condition for a user, in addition to the light from the irradiator attached to the apparatus, the external light enters into the document surface. Therefore, the D.sub.IN (output value of each pixel when the CCD reads out a main-scan directional line) takes on the value below: EQU D.sub.IN =D.sub.S +G [4]
As a result, with the main-scan shading correction on the basis of the corrective coefficient .beta., the D.sub.OUT (output value of each pixel after the main-scan shading correction) is determined by the following equation: EQU D.sub.OUT =.beta..times.D.sub.IN [5.1]
Substituting the above equations [1] and [4] in this equation [5.1] yields the equation below: EQU D.sub.OUT =(Z.sub.0 /D.sub.S).times.(D.sub.S +G) [5.2]
When the above-mentioned output value D.sub.OUT is equal to the Z.sub.0 (output reference value of each pixel after the correction), the following equation is derived by the above equation [5.2]: EQU Z.sub.0 =(Z.sub.0 /D.sub.S).times.(D.sub.S +G) [6.1]
This equation is expanded as follows: EQU Z.sub.0 =Z.sub.0 +(Z.sub.0.times.G)/D.sub.S [6.2]
The above equation [6.2] is derived when the external-light amount G is 0, that is, in the case that the document image is read out under the light only from the irradiator, and with the absence of external light into the document surface. However, since the image reading apparatus for loading the document face up is constructed such that the external light will enter into the document surface, it is impossible to accurately correct the main-scan shading with the equation [5.2]. As shown in FIG. 10, a curve B2 which indicates the output values of each pixel in the CCD in a main-scan directional line effected by the external light, being corrected by the corrective coefficient .beta., becomes a curve B3, which brings on the over-correction.
In order to achieve the above-mentioned objectives, according to one aspect of the present invention, an image reading apparatus comprises: an irradiator which lights up a document of which image is to be read out; an image reader which obtains image data by reading out the image of the document lit up by light from the irradiator; a detector which is disposed in a position unaffected by the light from the irradiator, and detects an amount of light which enters from a light source other than the irradiator; a coefficient generator which generates a coefficient for correcting the image data obtained by the image reader, in response to the light amount detected by the detector; and, a corrector which corrects the image data obtained by the image reader, based on the coefficient generated by the coefficient generator.
According to further aspects of the present invention, a method for correcting image data which is obtained by reading out a document image lit up by light from an irradiator, comprises: a step of detecting an amount of light which enters from a light source other than the irradiator in a position unaffected by light from the irradiator; a step of obtaining a coefficient for correcting image data by using the light amount detected in said light amount detecting step; a step of obtaining the image data by reading out an image of the document lit up by the light from the irradiator; and, a step of correcting the image data obtained in said image data obtaining step by using the coefficient obtained in said coefficient obtaining step.